package com.company.skill;

import com.company.creature.Creature;

/**
 * @description:
 * @author: ZhaoYicong
 * @date: Created in 2020/5/13 21:11
 * @version: v1.0
 * @modified By:
 */
public class Mskill extends Skill {
    public Mskill(String owner, String id, String name, int magicValue, double beishu) {
        super(owner, id, name, magicValue, beishu);
    }

    @Override
    public void skillDescription() {
        System.out.println("对单个英雄 造成 自身总攻击力"+super.getBeishu()*100+"%的伤害");
    }

    @Override
    public boolean useSkill(Creature creature, Creature targetCreature) {
        int hurtValue=(int)((creature.getIniHurt()+creature.getCurrentWeapon().getHurtValue())*super.getBeishu());
        super.setHurtValu(hurtValue);
        targetCreature.setHp(targetCreature.getHp()+hurtValue);
        creature.setMp(creature.getHp()+this.getMagicValue());
        return true;
    }
}
